import {
  Controller,
  Get,
  Post,
  Body,
  Patch,
  Param,
  Delete,
  Query,
} from '@nestjs/common';
import { MarketingService } from './marketing.service';
import { CreateMarketingDto } from './dto/create-marketing.dto';
import { UpdateMarketingDto } from './dto/update-marketing.dto';
import { FindMarketingDto } from './dto/find-marketing.dto';

@Controller('market')
export class MarketingController {
  constructor(private readonly marketingService: MarketingService) {}

  @Post('register')
  create(@Body() createMarketingDto: CreateMarketingDto) {
    console.log(111);
    return this.marketingService.create(createMarketingDto);
  }

  @Post('findAll')
  findAll(@Body() param: FindMarketingDto) {
    console.log(param);
    return this.marketingService.findAll();
  }

  @Get('byId')
  findOne(@Query('id') id: string) {
    return this.marketingService.findOne(+id);
  }
}
